From affb7d88442e871f1a8796fd4002f89b69f96e57 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild2.aw" Date: Tue, 23 Jan 2007 12:01:38 -0700 Subject: [PATCH] [IA64] Improve INIT call trace Signed-off-by: Akio Takebe --- xen/arch/ia64/linux-xen/mca.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xen/arch/ia64/linux-xen/mca.c b/xen/arch/ia64/linux-xen/mca.c index faa73e6672..5a820973b4 100644 --- a/xen/arch/ia64/linux-xen/mca.c +++ b/xen/arch/ia64/linux-xen/mca.c @@ -84,6 +84,7 @@ #include #include #include +#include #endif #if defined(IA64_MCA_DEBUG_INFO) @@ -685,6 +686,7 @@ fetch_min_state (pal_min_state_area_t *ms, struct pt_regs *pt, struct switch_sta static spinlock_t init_dump_lock = SPIN_LOCK_UNLOCKED; static spinlock_t show_stack_lock = SPIN_LOCK_UNLOCKED; static atomic_t num_stopped_cpus = ATOMIC_INIT(0); +extern void show_stack (struct task_struct *, unsigned long *); #define CPU_FLUSH_RETRY_MAX 5 static void @@ -773,6 +775,8 @@ init_handler_platform (pal_min_state_area_t *ms, spin_unlock(&show_stack_lock); if (spin_trylock(&init_dump_lock)) { + struct domain *d; + struct vcpu *v; #ifdef CONFIG_SMP int other_cpus = num_online_cpus() - 1; int wait = 1000 * other_cpus; @@ -782,7 +786,19 @@ init_handler_platform (pal_min_state_area_t *ms, if (other_cpus && wait < 0) printk("timeout %d\n", atomic_read(&num_stopped_cpus)); #endif - unw_init_running(try_crashdump, pt); + if (opt_noreboot) { + /* this route is for dump routine */ + unw_init_running(try_crashdump, pt); + } else { + for_each_domain(d) { + for_each_vcpu(d, v) { + printk("Backtrace of current vcpu " + "(vcpu_id %d of domid %d)\n", + v->vcpu_id, d->domain_id); + show_stack(v, NULL); + } + } + } } unw_init_running(freeze_cpu_osinit, NULL); #else /* XEN */ -- 2.30.2